package com.camelot.boot.module.ai.dal.mysql.chat;

import com.camelot.boot.framework.common.pojo.PageResult;
import com.camelot.boot.framework.mybatis.core.mapper.BaseMapperX;
import com.camelot.boot.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.camelot.boot.module.ai.controller.admin.chat.vo.transfer.AiResumeTransferPageReqVO;
import com.camelot.boot.module.ai.dal.dataobject.chat.AiResumeTransferDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface AiResumeTransferMapper extends BaseMapperX<AiResumeTransferDO> {
    default PageResult<AiResumeTransferDO> selectPage(AiResumeTransferPageReqVO pageReqVO) {
        return selectPage(pageReqVO, new LambdaQueryWrapperX<AiResumeTransferDO>()
                .eqIfPresent(AiResumeTransferDO::getType,pageReqVO.getType())
                .eqIfPresent(AiResumeTransferDO::getUserId, pageReqVO.getUserId())
                .eqIfPresent(AiResumeTransferDO::getCandidateName,pageReqVO.getCandidateName())
                .eqIfPresent(AiResumeTransferDO::getMobile,pageReqVO.getMobile())
                .eqIfPresent(AiResumeTransferDO::getIdNumber,pageReqVO.getIdNumber())
                .orderByDesc(AiResumeTransferDO::getId));
    }
}
